package com.sa.module.uif.pojo;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

/**
 * 活动留言：（1）为存在的活动留言（2）为参加活动的用户留言
 * @author huangxin
 *
 */
@MappedSuperclass
public class AbstractActMess {
 
	private int id;
	private String mess;	//留言内容
	private String name;	//留言人的姓名
	private Timestamp mTime;	//留言时间
	private int num;	//留言序号，对于某个活动，序号从1开始递增
	private int mKind;	//留言类型：游客（未注册的使用者，用0表示）/用户（已注册的使用者，用1表示）
	private int tId;	//留言板块Id:（1）/（2）
	
	public AbstractActMess(int id, String mess, String name, Timestamp mTime,
			int num, int mKind, int tId) {
		super();
		this.id = id;
		this.mess = mess;
		this.name = name;
		this.mTime = mTime;
		this.num = num;
		this.mKind = mKind;
		this.tId = tId;
	}
	
	public AbstractActMess() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	@Id 
	@GeneratedValue(strategy=IDENTITY)	    
	@Column(name="ID", unique=true, nullable=false)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Column(name="MESS", nullable=true, length=200)
	public String getMess() {
		return mess;
	}
	public void setMess(String mess) {
		this.mess = mess;
	}
	
	@Column(name="NAME", nullable=true, length=30)
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name="MTIME", nullable=true)
	public Timestamp getmTime() {
		return mTime;
	}
	public void setmTime(Timestamp mTime) {
		this.mTime = mTime;
	}
	
	@Column(name="NUM", nullable=true)
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	
	@Column(name="MKIND", nullable=true)
	public int getmKind() {
		return mKind;
	}
	public void setmKind(int mKind) {
		this.mKind = mKind;
	}
	
	@Column(name="TID", nullable=true)
	public int gettId() {
		return tId;
	}
	public void settId(int tId) {
		this.tId = tId;
	}
	@Override
	public String toString() {
		return "AbstractActMess [id=" + id + ", mess=" + mess + ", name="
				+ name + ", mTime=" + mTime + ", num=" + num + ", mKind="
				+ mKind + ", tId=" + tId + "]";
	}
	
	
}
